package org.bdware.doip.core.doipMessage;

public enum DoipMessageFormat {
    DELIMITER("delimiter"),
    PACKET("packet"),
    UNKNOWN("unknown");
    private final String name;
    DoipMessageFormat(String displayName) {
        this.name = displayName;
    }

    public String getName() {
        return name;
    }

    public static DoipMessageFormat getMessageFormat(String fmtName){
        for (DoipMessageFormat type : DoipMessageFormat.values()) {
            if (type.getName().equals(fmtName)) {
                return type;
            }
        }
        return DoipMessageFormat.UNKNOWN;
    }
}
